-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-8023] [SQL] Add a deterministic method to Expression. #6570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
/** Returns true if any expression in projectList is non-deterministic. */ | ||
private def hasNondeterministic(projectList: Seq[NamedExpression]): Boolean = { | ||
projectList.exists(expr => expr.find(!_.deterministic).isDefined) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this won't match on rand() + 1 will this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will match rand() + 1. find
will traverse the expression tree in pre-order.
[SPARK-8023] [SQL] Add a deterministic method to Expression.
Test build #33953 has finished for PR 6570 at commit
|
Test build #33955 has finished for PR 6570 at commit
|
…d collapsing nondeterministic projects. This closes #6570. Author: Yin Huai <[email protected]> Author: Reynold Xin <[email protected]> Closes #6573 from rxin/deterministic and squashes the following commits: 356cd22 [Reynold Xin] Added unit test for the optimizer. da3fde1 [Reynold Xin] Merge pull request #6570 from yhuai/SPARK-8023 da56200 [Yin Huai] Comments. e38f264 [Yin Huai] Comment. f9d6a73 [Yin Huai] Add a deterministic method to Expression. (cherry picked from commit 0f80990) Signed-off-by: Reynold Xin <[email protected]> Conflicts: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/random.scala
…d collapsing nondeterministic projects. This closes #6570. Author: Yin Huai <[email protected]> Author: Reynold Xin <[email protected]> Closes #6573 from rxin/deterministic and squashes the following commits: 356cd22 [Reynold Xin] Added unit test for the optimizer. da3fde1 [Reynold Xin] Merge pull request #6570 from yhuai/SPARK-8023 da56200 [Yin Huai] Comments. e38f264 [Yin Huai] Comment. f9d6a73 [Yin Huai] Add a deterministic method to Expression.
…d collapsing nondeterministic projects. This closes apache#6570. Author: Yin Huai <[email protected]> Author: Reynold Xin <[email protected]> Closes apache#6573 from rxin/deterministic and squashes the following commits: 356cd22 [Reynold Xin] Added unit test for the optimizer. da3fde1 [Reynold Xin] Merge pull request apache#6570 from yhuai/SPARK-8023 da56200 [Yin Huai] Comments. e38f264 [Yin Huai] Comment. f9d6a73 [Yin Huai] Add a deterministic method to Expression.
…d collapsing nondeterministic projects. This closes apache#6570. Author: Yin Huai <[email protected]> Author: Reynold Xin <[email protected]> Closes apache#6573 from rxin/deterministic and squashes the following commits: 356cd22 [Reynold Xin] Added unit test for the optimizer. da3fde1 [Reynold Xin] Merge pull request apache#6570 from yhuai/SPARK-8023 da56200 [Yin Huai] Comments. e38f264 [Yin Huai] Comment. f9d6a73 [Yin Huai] Add a deterministic method to Expression.
https://issues.apache.org/jira/browse/SPARK-8023